﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleGraphLib
{
    public interface IGraph<TVertex>
    {
        IEnumerable<IEdge<TVertex>> Edges { get; }
        IEnumerable<TVertex> Vertices { get; }

        /// <summary>
        /// Graph type
        /// </summary>
        GraphType Type { get; }

        /// <summary>
        /// Is edge exist between vertices source and dest
        /// </summary>
        /// <param name="source"></param>
        /// <param name="dest"></param>
        /// <returns></returns>
        bool IsEdge(TVertex source, TVertex dest);

        /// <summary>
        /// Add the edge between source and dest
        /// </summary>
        /// <param name="source"></param>
        /// <param name="dest"></param>
        /// <param name="weight"></param>
        void AddEdge(TVertex source, TVertex dest, double weight);

        /// <summary>
        /// Remove the edge between source and dest
        /// </summary>
        /// <param name="source"></param>
        /// <param name="dest"></param>
        void RemoveEdge(TVertex source, TVertex dest);

        /// <summary>
        /// Return edge between source and dest
        /// </summary>
        /// <param name="source"></param>
        /// <param name="dest"></param>
        /// <returns></returns>
        IEdge<TVertex> GetEdge(TVertex source, TVertex dest);

        /// <summary>
        /// Add new vertex
        /// </summary>
        /// <param name="vertex"></param>
        void AddVertex(TVertex vertex);

        /// <summary>
        /// Remove vertex from graph
        /// </summary>
        /// <param name="vertex"></param>
        /// <returns></returns>
        bool RemoveVertex(TVertex vertex);

        /// <summary>
        /// Is graph complete.
        /// A complete graph is a simple undirected graph in which every pair of distinct vertices is connected by a unique edge.
        /// </summary>
        /// <returns>true if is complete</returns>
        bool IsComplete();


    }
}
